package com.dorso.start;

import com.dorso.Exception.NoSuchBeanException;
import com.dorso.Exception.NoSuchPropertyException;
import com.dorso.IOC.MiniApplicationContext;
import com.dorso.entity.*;
import org.dom4j.DocumentException;

import java.lang.reflect.InvocationTargetException;

public class main {
    static String xmlPath="applicationContext.xml";

    public static void main(String[] args) throws DocumentException, NullPointerException,ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, NoSuchBeanException, NoSuchPropertyException, NoSuchFieldException, NoSuchPropertyException, InvocationTargetException, NoSuchBeanException {
        MiniApplicationContext mac=MiniApplicationContext.createIOC(xmlPath);
        BookService bookService=(BookService) mac.getBean("bookService");
        bookService.save();
    }
}
